package extraStuff;
/**
 * 
 */

/**
 * @author clewis6
 *
 */
import java.awt.*;
import javax.swing.*;

//not used
///////////////////////////////////////////////// class BorderTest
@SuppressWarnings("serial")
class GUI extends JFrame {

    //======================================================= main
    public static void main(String[] args) {
        JFrame window = new GUI();
        window.setVisible(true);
    }

    //================================================ constructor
    GUI() {
     	JPanel handCenterPanel = new JPanel();
    	handCenterPanel.setLayout(new BorderLayout(2,2));
    	JPanel dealerCenterPanel = new JPanel();
    	dealerCenterPanel.setLayout(new BorderLayout(2,2));   	
    	JPanel centerPanel = new JPanel();
    	centerPanel.setLayout(new BorderLayout(2,2));
    	
    	JPanel eastPanel = new JPanel();
    	eastPanel.setLayout(new BorderLayout(2,2));
    	
    	JPanel southPanel = new JPanel();
    	southPanel.setLayout(new GridLayout(1,0,2,2));

    	//set up panels
    	setUpCenter(handCenterPanel, dealerCenterPanel, centerPanel);
    	
    	setupEastPanel(eastPanel);
    	
    	setUpSouthPanel(southPanel);
    	
    	
        JButton north  = new JButton("North");

        JButton south  = new JButton("South");
        JButton west   = new JButton("West");
        
        
        
        //... Create content pane, set layout, add components
        JPanel content = new JPanel();
        content.setLayout(new BorderLayout(10,10));

        //content.add(north , BorderLayout.NORTH);
        content.add(eastPanel  , BorderLayout.EAST);
        content.add(southPanel , BorderLayout.SOUTH);
       
        content.add(centerPanel, BorderLayout.CENTER);

        //... Set window characteristics.
        setContentPane(content);
        setTitle("BorderTest");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        pack();
    }

	/**
	 * @param southPanel
	 */
	private void setUpSouthPanel(JPanel southPanel) {
		JButton raise = new JButton("raise");
    	JLabel currentBetLable = new JLabel("current bet:");
    	JTextPane currentBetText = new JTextPane();
    	southPanel.add(raise);
    	southPanel.add(currentBetLable);
    	southPanel.add(currentBetText);
	}

	/**
	 * @param eastPanel
	 */
	private void setupEastPanel(JPanel eastPanel) {
		JButton hit = new JButton("hit");
    	JButton stand = new JButton("stand");
    	eastPanel.add(hit, BorderLayout.NORTH);
    	eastPanel.add(stand, BorderLayout.SOUTH);
	}

	/**
	 * sets up the center panel
	 * @param handCenterPanel
	 * @param dealerCenterPanel
	 * @param centerPanel
	 */
	private void setUpCenter(JPanel handCenterPanel, JPanel dealerCenterPanel,
			JPanel centerPanel) {
		handCenterPanel.add(new JLabel("your hand"), BorderLayout.NORTH);
    	JTextPane yourHand =new JTextPane();
    	handCenterPanel.add(yourHand, BorderLayout.CENTER);
    	
    	dealerCenterPanel.add(new JLabel("dealer's hand"), BorderLayout.NORTH);
    	JTextPane dealerHand =new JTextPane();
    	dealerCenterPanel.add(dealerHand, BorderLayout.CENTER);
    	
    	centerPanel.add(handCenterPanel, BorderLayout.WEST);
    	centerPanel.add(new JLabel(" "),BorderLayout.CENTER);
    	centerPanel.add(dealerCenterPanel, BorderLayout.EAST);
	}
}

